#include <head.h>



char buf[128];
int main(int argc, char const *argv[])
{
    int fd = open("my_fifo" , O_WRONLY);
    OPEN_ERR(fd);
    printf("写端\n");
    while (1)
    {
        memset(buf , 0 , sizeof(buf));
        printf("请输入要写入的内容:\n");
        scanf("%s",buf);
        write(fd,buf,sizeof(buf));
        if (!strcmp(buf,"quit"))
        {
            
            break;
        }

    }
    
    return 0;
}
